Skip to content

sampler.py: Add args to specify params to optimize over + not copy full model.#102

Open
wiwu2390 wants to merge 2 commits intotimaeus-research:mainfrom
wiwu2390:main
Open

sampler.py: Add args to specify params to optimize over + not copy full model.#102
wiwu2390 wants to merge 2 commits intotimaeus-research:mainfrom
wiwu2390:main

Conversation

@wiwu2390
Copy link
Copy Markdown

@wiwu2390 wiwu2390 commented Mar 25, 2025

This is useful for memory-efficient LoRA-SGMCMC (or parameter-refined SGMCMC in general).

With the existing implementation, the full model's parameters are copied at least twice: once in sample_single_chain, and another time for the localizing prior. I think the prior should never have to copy non-optimized params, while sample_single_chain should only need to do so when running on multiple GPUs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant